#ifndef BMIMANAGER_H
#define BMIMANAGER_H

#include <QObject>
#include <QStandardItemModel>
#include <QDate>


class BmiManager : public QObject
{
    Q_OBJECT
    public :
        BmiManager(QObject * parent = 0);
        ~BmiManager();
        QStandardItemModel * getDatasFromCsvFiles(const QString & csvFile);
        QStringList getListOfPointsInDays();   
        QStandardItemModel * getWeightFemale();
        QStandardItemModel * getHeightFemale();
        QStandardItemModel * getBmiFemale();
        QStandardItemModel * getWeightMale();
        QStandardItemModel * getHeightMale();
        QStandardItemModel * getBmiMale();
        float calcDateInMonthsSinceBirthday(QDate date,QDate birthday);
        float calcBmiFromWeightAndHeight(float weight,float height);
        bool firsttimeMessage();
        void configRecordAllRight();
        void exitOfApplicationMessage();
    private :
        void getAllModelsEntireLife();
        float calcBmi(float weight,float height);
        void setAllLifeBmiAccordMonths();
        QString m_pathToCsvFiles;
        QStandardItemModel * m_weight_female_model;
        QStandardItemModel * m_height_female_model;
        QStandardItemModel * m_bmi_female_model;
        QStandardItemModel * m_weight_male_model;
        QStandardItemModel * m_height_male_model;
        QStandardItemModel * m_bmi_male_model;    
};


#endif

